import { defineStore } from "pinia";
import { type ContentModel } from "@/api/discovery/integrated";
import { getIntegratedTopList } from "@/api/index/course";
import { type filterListType } from "@/api/discovery/filter";

export const useCourseDataStore = defineStore({
    id: "courseDataStore",
    state: () => {
        return {
            // 数据
            integratedData1: [] as ContentModel[],
        };
    },
    actions: {
        // 1.综合榜单
        async getIntegratedDataAsync(page: number) {
            const res = await getIntegratedTopList(page);
            this.integratedData1 = res.content;
        },
    },
});
